package com.yb.java.abstract_factory;

/**
 * @program: design-pattern
 * @description: 工厂生成器
 * @author: Mr.Bo
 * @create: 2021-04-29 01:59
 **/
public class FactoryProducer {

    public static AbstractFactory getFactory(String choice){
        if(choice.equalsIgnoreCase("SHAPE")){
            return new ShapeFactory();
        } else if(choice.equalsIgnoreCase("COLOR")){
            return new ColorFactory();
        }
        return null;
    }
}
